#!/bin/bash

# 将命令追加到 ~/.bashrc 文件
echo 'export KERNELDIR=/home/dengxm2024/linuxProgDir/linuxkerneldir/linux-2.6.35.3' >> ~/.bashrc
echo 'export CROSS_COMPILE=arm-fsl-linux-gnueabi-' >> ~/.bashrc
echo 'export ARCH=arm' >> ~/.bashrc
echo 'export PATH=/opt/arm-fsl-linux-gnueabi/bin:$PATH' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/opt/arm-fsl-linux-gnueabi/lib:$LD_LIBRARY_PATH' >> ~/.bashrc

echo 'export CC=arm-fsl-linux-gnueabi-gcc' >> ~/.bashrc
echo 'export CXX=arm-fsl-linux-gnueabi-g++' >> ~/.bashrc
echo 'export AR=arm-fsl-linux-gnueabi-ar' >> ~/.bashrc
echo 'export RANLIB=arm-fsl-linux-gnueabi-ranlib' >> ~/.bashrc
echo 'export NM=arm-fsl-linux-gnueabi-nm' >> ~/.bashrc
echo 'export LD=arm-fsl-linux-gnueabi-ld' >> ~/.bashrc
echo 'export STRIP=arm-fsl-linux-gnueabi-strip' >> ~/.bashrc

# 使更改生效
source ~/.bashrc

# 输出确认信息
echo "Environment variables have been added to ~/.bashrc and sourced."

